Repository navigation
osiris nexus: Quantinuum Nexus via the official qnexus SDK (0.51.4) - #72
Merged
Merged
Conversation
The existing QuantinuumNexusClient calls /api/v1/{backends,targets,jobs},
which Nexus does not serve (real API: /api/circuits/v1beta2,
/api/jobs/v1beta3, ...; auth via qnx.login). New NexusSdkRunner uploads,
compiles on Nexus, prices with the H2 syntax checker (circuits.cost), and
executes with per-circuit max_cost caps; Tier 2 capped by HQC, Tier 3 needs a
signed token bound to the compiled-batch SHA-256. Receipts go to the existing
NexusAuditLedger. A test binds every SDK call to qnexus 0.51.4's real
signatures (skipped without qnexus). Extra: osiris-cli[nexus].
Full suite: 3077 passed, 27 skipped, 12 failed; the 12 also fail on
origin/main (tests/test_quantinuum_client.py, pytket 2.18.5 QASM conditionals).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
QuantinuumNexusClient(merged in #71) sends hand-written REST calls to/api/v1/backends,/api/v1/targetsand/api/v1/jobs. Nexus does not serve those paths. Its real API is versioned per resource (/api/circuits/v1beta2,/api/jobs/v1beta3,/api/compilations/v1beta3, …) and authenticates withqnx.login(). The old client's tests pass only because they run against fakes of the invented API.What
osiris_cli/providers/nexus_sdk.pyaddsNexusSdkRunner, which works through theqnexusSDK:start_compile_job, then price each compiled circuit withcircuits.cost(..., syntax_checker="H2-1SC"), cross-checked against the local HQC formula;start_execute_jobwith a per-circuitmax_cost. Tier 2 (H2-1E) is capped by--max-emulator-hqc. Tier 3 (H2-1, H2-2) needs a signed token bound to the compiled-batch SHA-256, target, shots and HQC (existingverify_tier3_token).NexusAuditLedger, with no new store.osiris nexus preflight|run|grant|status(--matchregex,--limit).osiris-cli[nexus]pinsqnexus==0.51.4.docs/quantinuum/NEXUS_SDK_QUICKSTART.mdcovers the first session with the XTOP-005 H2-1 circuits.Verification
tests/test_nexus_sdk.py: 7 passed. One test binds every recorded SDK call to the real qnexus 0.51.4 signatures; it is skipped when qnexus is not installed, so it does not run in CI.AuthenticationError.origin/mainwhen pytket is installed (CI does not install it):tket_wrapperraisesQASMUnsupportedErrorwhen exporting single-bit conditions, and ignoresno_reduceon the pytket path. Fixed separately in the tket-conditionals PR. (An earlier version of this description said feed-forward was dropped; it is not, pytket only rewritesxasu3.)bootstrap_osiris_agents.py --verify-only,py_compileandgit diff --check: all pass.🤖 Generated with Claude Code